﻿<local:DocumentBase x:Class="WPFExcelReport.QVWVK02"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
                    xmlns:db="clr-namespace:INTEX.DataBase" 
                    Loaded="Window_Loaded" 
                    xmlns:ChartEx="clr-namespace:WPFExcelReport.Chart;assembly=ITXVIEWS"
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"
                    Background="White" 
                    >
    <local:DocumentBase.Resources>
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:MaskPrice  x:Key="dprice"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:Divideby10000  x:Key="d10000"/>
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
        <ucd:String2ColorConverter  x:Key="str2color"/>
        <ucd:PNumConverter  x:Key="pnum"/> 
        <CollectionViewSource   x:Key="vwMaster" Source="{Binding Path=SetMaster.QVW_VKPOS}" /> 
    </local:DocumentBase.Resources>
    <TabControl> 
        <TabItem Header="查询">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"></RowDefinition> 
                    <RowDefinition Height="1*" ></RowDefinition>
                </Grid.RowDefinitions> 
                    <WrapPanel   Grid.Row="0" Grid.Column="0" >                        
                        <Grid    >
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions> 
                            <Label Content="图表" Grid.Column="0"  Height="Auto"  HorizontalAlignment="Left" Margin="3" VerticalAlignment="Center" />
                            <Button Grid.Column="1" VerticalAlignment="Center"  Margin="0,0,0,0" Click="btnRefreshChart_Click" Height="20" Width="20" KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                                <Button.Background>
                                    <ImageBrush ImageSource="/YGRVK02LIST;component/Images/Convert.png" />
                                </Button.Background>
                            </Button>
                        </Grid>  
                        <TextBlock Text="是否完成" VerticalAlignment="Top" Height="20" ></TextBlock>
                        <CheckBox FontSize="12"   Margin="10,0,0,0" HorizontalAlignment="Right" Height="20" Width="20">
                            <CheckBox.LayoutTransform>
                                <ScaleTransform ScaleX="2" ScaleY="2" />
                            </CheckBox.LayoutTransform>
                        </CheckBox>
                        <TextBlock Text="交期早于"   VerticalAlignment="Top" ></TextBlock>
                        <TextBox    Width="100" Margin="0,0,0,0" Text="{Binding DEND}" HorizontalAlignment="Left" Height="20" VerticalAlignment="Top" />
                        <Button  Margin="10,0,0,0" Click="btnQuery_Click" Height="20" Width="20" VerticalAlignment="Top" KeyboardNavigation.TabIndex="3" IsDefault="True" TabIndex="13">
                            <Button.Background>
                            <ImageBrush ImageSource="/YGRVK02LIST;component/Images/Search.png" /> 
                            </Button.Background>
                        </Button> 
                    </WrapPanel> 
                    <DataGrid   Grid.Row="1"
                              AutoGenerateColumns="False"
                              EnableRowVirtualization="True"  
                              ItemsSource="{Binding Source={StaticResource ResourceKey=vwMaster}}"  
                              HeadersVisibility="Column"
                              x:Name="dlgMaster"    
                              Height="Auto"
                              ScrollViewer.HorizontalScrollBarVisibility="Auto"
                              ScrollViewer.VerticalScrollBarVisibility="Auto" 
                              >
                        <DataGrid.Columns>
                            <DataGridTextColumn Binding="{Binding Path=VKPPOSTYP}" Header="类型"   Width="Auto"  MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=NYEAR}"   Header=""  Width="Auto"  MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=NMONTH}"   Header=""  Width="Auto"  MinWidth="40"/>  
                        <DataGridTextColumn Binding="{Binding Path=VKPAUF}" Header="编号"   Width="Auto"  MinWidth="40"/> 
                            <DataGridTextColumn Binding="{Binding Path=KDKUNDNA}" Header="客户"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPART}" Header="品种"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPFARBE}" Header="色号"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKCOM}" Header="成份"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=STRENGTH}" Header="强力标准"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMENGE1}" Header="预计重量" Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPMEEH}" Header="单位"  Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPSACHBE}" Header="联系人" Width="Auto" MinWidth="40"/>
                        <DataGridTextColumn Binding="{Binding Path=VKPPREIS}" Header="价格"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=PUM}" Header="UM"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPLIEFTERM}" Header="交期"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKKBESTDAT}" Header="询价日期"  Width="Auto" MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKPNEUDAT}" Header="报价日期"   Width="Auto"  MinWidth="40"/>
                            <DataGridTextColumn Binding="{Binding Path=VKKGLTBIS}" Header="有效期"  Width="Auto" MinWidth="40"/>
                        </DataGrid.Columns>
                    </DataGrid> 
            </Grid>
        </TabItem> 
    </TabControl>
</local:DocumentBase>